home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso
/
x2ftp
/
msdos
/
ai
/
gaf200b
/
example
/
heattank.sim
< prev
next >
Wrap
Text File
|
1994-09-27
|
1KB
|
69 lines
!--------------------------------------------------------
! Water tank heat control simulation
! Assume constant volume (i.e. water in = water out)
!--------------------------------------------------------
FEEDBACK TankTempSim
CYCLE_TIME 1.0
! Name MIN MAX
IN Temperature(32.0, 212.0)
IN Gas_valve (0.0, 10.0)
OUT Temp_error (-180.0, 180.0)
OUT Target_temp(32.0, 212.0)
OUT TempWaterIn(32.0, 212.0)
OUT Heating (0, 1)
INOUT Water_out (0.0, 1.0)
Initialization
Target_Temp = 180;
Water_out = 0.2; !0.05;
Temp_error = 0;
TempWaterIn = 80;
Heating = 1;
PRE_PROCESSING
Temp_error = Temperature - Target_temp;
IF Heating = 1 THEN
IF ( Temp_error > -1.0 ) AND ( Water_out < 0.3 ) THEN
Heating = 0;
ENDIF;
ELSE
IF Temp_error < -5.0 THEN
Heating = 1;
ENDIF;
ENDIF;
END;
PRESET ! 1
Target_Temp = 180;
Heating = 1;
Water_out = 0; !0.3;
END;
PRESET ! 2
Target_Temp = 180;
Heating = 1;
Water_out = 0.1; !0.5;
END;
PRESET ! 3
Target_Temp = 180;
Heating = 1;
Water_out = 0.4; !0.7;
END;
PRESET ! 4
Target_Temp = 180;
Heating = 1;
Water_out = 0.6; !0.8;
END;
PRESET ! 5
Target_Temp = 180;
Heating = 1;
Water_out = 1; !0.9;
END;
END TankTempSim;